<template>
  <view class="movie-player">
    <video
  v-if="videoUrl"
  :src="videoUrl"
  controls
  autoplay
  style="width: 100%; height: 400rpx; background: #000;"
></video>
    <view v-else class="no-video">未获取到电影资源</view>
  </view>
</template>

<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'

const videoUrl = ref('')

onLoad((options) => {
  videoUrl.value = options.video || ''
})
</script>

<style>
.movie-player {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #111;
  padding-top: 40rpx;
}
.no-video {
  color: #fff;
  font-size: 32rpx;
  margin-top: 100rpx;
}
</style>
